home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gf19lc5 / exterror.h < prev    next >
C/C++ Source or Header  |  1995-04-27  |  1KB  |  33 lines

  1. /*****************************************************************************
  2.  * EXTERR.H - Extensions to errno for application-specific error handling.
  3.  ****************************************************************************/
  4.  
  5. #ifndef EXTERROR_H
  6. #define EXTERROR_H
  7.  
  8. #include <errno.h>                /* pull in compiler's standard errno stuff */
  9.  
  10. #ifndef E_OK
  11.   #define E_OK 0
  12. #endif
  13.  
  14. #ifndef ERROR
  15.   #define ERROR (-1)
  16. #endif
  17.  
  18. typedef struct _Err_tab {        /* application-specific error message table*/
  19.     int     code;                /* error code                               */
  20.     char    *msg;                /* pointer to message for this code        */
  21.     } _Err_tab;                 /* last entry marked by entry w/code 0       */
  22.  
  23. #if defined(LATTICE) || defined(__TURBOC__)
  24.   extern int  exterrset(_Err_tab *ptab, int install_or_remove);
  25.   extern char *exterror(int errcode);
  26. #else
  27.   extern  int    exterrset();      /* add/remove ap-specific err msg table     */
  28.   extern  char    *exterror();      /* get ap-specific error message             */
  29. #endif
  30.  
  31. #endif
  32.  
  33.